// components/list/index.js



Component({
  /**
   * 组件的属性列表
   */
  properties: {
    defaultList:Object,
  },

  /**
   * 组件的初始数据
   */
  data: {
    tapIndex:'',
    _id:'',
    avatar:'',
    up:'',
    digest:''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getInfo(){
      this.triggerEvent('getInfo',{
        avatar:this.data.defaultList.avatar,
        up:this.data.defaultList.up,
        digest:this.data.defaultList.digest
      })
    },
    cancleConcern(){
      wx.showActionSheet({
        itemList:['特别关注','取消关注'],
        success:res=>{
          // console.log(res);
          this.setData({
            tapIndex:res.tapIndex
          }) 
          this.triggerEvent("cancle",{ 
            _id:this.data.defaultList._id,
            tapIndex:this.data.tapIndex,
            
          })
         
        }   
      }) 
    },
    concern(){
     this.setData({
       tapIndex:2
     })
     this.triggerEvent("concern",{ 
      _id:this.data.defaultList._id,
      tapIndex:this.data.tapIndex
    })
    }
  }
})
